# 斐波那契数列

x = eval(input())
fibnp = 1
fibp = 1
fib = 0

if x == 1 or x == 2:
    print(1)
else:
    for i in range(2, x):
        fib = fibnp + fibp
        fibnp = fibp
        fibp = fib
    print(fib)